﻿using Microsoft.AspNetCore.Http;
using System;
using System.Threading.Tasks;
using xycn.pluginsupport.AspNetCorePlugins;

namespace test_midareplugin
{
    public class testMidwareClas1
    {
        [AspNetMidware(3)]
        public async Task asdfasdf3(Microsoft.AspNetCore.Http.HttpContext context)//, Func<Task> next)
        {
            System.Console.WriteLine("class1 no netxt call midware3");
        }

        [AspNetMidware(2)]
        public async Task asdfasdf2(Microsoft.AspNetCore.Http.HttpContext context, Func<Task> next)
        {
            System.Console.WriteLine("class1 call midware2");
            await next.Invoke();
        }

        [AspNetMidware(1)]
        public async Task asdfasdf(HttpContext context, Func<Task> next)
        {
            System.Console.WriteLine("class1 call midware");
            await next.Invoke();
        }

        [AspNetMidware(100)]
        public async Task asdfasdf4(Microsoft.AspNetCore.Http.HttpContext context, Func<Task> next)
        {
            System.Console.WriteLine("class1 call midware100");
            await next.Invoke();
        }

        [AspNetMidware(101)]
        public async Task asdfasdf5(HttpContext context, Func<Task> next)
        {
            System.Console.WriteLine("class1 call midware101");
            await next.Invoke();
        }

        [AspNetMidware(95)]
        public async Task asdfasdf6(Microsoft.AspNetCore.Http.HttpContext context, Func<Task> next)
        {
            System.Console.WriteLine("class1 call midware95");
            await next.Invoke();
        }
    }
}
